package com.ruoyi.sys.emeknowledge.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sys.emeknowledge.mapper.TbEmergencyKnowledgeMapper;
import com.ruoyi.sys.emeknowledge.domain.TbEmergencyKnowledge;
import com.ruoyi.sys.emeknowledge.service.ITbEmergencyKnowledgeService;

/**
 * 应急知识库Service业务层处理
 * 
 * @author iuxin
 * @date 2022-05-25
 */
@Service
public class TbEmergencyKnowledgeServiceImpl implements ITbEmergencyKnowledgeService 
{
    @Autowired
    private TbEmergencyKnowledgeMapper tbEmergencyKnowledgeMapper;

    /**
     * 查询应急知识库
     * 
     * @param ekId 应急知识库主键
     * @return 应急知识库
     */
    @Override
    public TbEmergencyKnowledge selectTbEmergencyKnowledgeByEkId(Long ekId)
    {
        return tbEmergencyKnowledgeMapper.selectTbEmergencyKnowledgeByEkId(ekId);
    }

    /**
     * 查询应急知识库列表
     * 
     * @param tbEmergencyKnowledge 应急知识库
     * @return 应急知识库
     */
    @Override
    public List<TbEmergencyKnowledge> selectTbEmergencyKnowledgeList(TbEmergencyKnowledge tbEmergencyKnowledge)
    {
        return tbEmergencyKnowledgeMapper.selectTbEmergencyKnowledgeList(tbEmergencyKnowledge);
    }

    /**
     * 新增应急知识库
     * 
     * @param tbEmergencyKnowledge 应急知识库
     * @return 结果
     */
    @Override
    public int insertTbEmergencyKnowledge(TbEmergencyKnowledge tbEmergencyKnowledge)
    {
        return tbEmergencyKnowledgeMapper.insertTbEmergencyKnowledge(tbEmergencyKnowledge);
    }

    /**
     * 修改应急知识库
     * 
     * @param tbEmergencyKnowledge 应急知识库
     * @return 结果
     */
    @Override
    public int updateTbEmergencyKnowledge(TbEmergencyKnowledge tbEmergencyKnowledge)
    {
        return tbEmergencyKnowledgeMapper.updateTbEmergencyKnowledge(tbEmergencyKnowledge);
    }

    /**
     * 批量删除应急知识库
     * 
     * @param ekIds 需要删除的应急知识库主键
     * @return 结果
     */
    @Override
    public int deleteTbEmergencyKnowledgeByEkIds(Long[] ekIds)
    {
        return tbEmergencyKnowledgeMapper.deleteTbEmergencyKnowledgeByEkIds(ekIds);
    }

    /**
     * 删除应急知识库信息
     * 
     * @param ekId 应急知识库主键
     * @return 结果
     */
    @Override
    public int deleteTbEmergencyKnowledgeByEkId(Long ekId)
    {
        return tbEmergencyKnowledgeMapper.deleteTbEmergencyKnowledgeByEkId(ekId);
    }
}
